﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Informant.Services.Models.Contacts;

namespace Informant.Services.Faults
{
	[DataContract]
	public class SendSmsFault
	{
		/// <summary>
		/// Gets or sets the message.
		/// </summary>
		/// <value>The message.</value>
		[DataMember]
		public String Message { get; set; }
		/// <summary>
		/// Gets or sets the rejected recipients.
		/// </summary>
		/// <value>The rejected recipients.</value>
		[DataMember]
		public IEnumerable<Phone> RejectedRecipients { get; set; }

		/// <summary>
		/// Initializes a new instance of the <see cref="SendSmsFault"/> class.
		/// </summary>
		/// <param name="message">The message.</param>
		public SendSmsFault(String message)
		{
			Message = message;
			RejectedRecipients = null;
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="SendSmsFault"/> class.
		/// </summary>
		/// <param name="message">The message.</param>
		/// <param name="rejectedRecipients">The rejected recipients.</param>
		public SendSmsFault(String message, IEnumerable<Phone> rejectedRecipients)
		{
			Message = message;
			RejectedRecipients = rejectedRecipients;
		}
	}
}
